Tutorial:   Submitting Assignments


For each assignment you must submit:

  •   .ipynb file     (Your Jupyter notebook)
  •   .html file     (Your exported Jupyter notebook)
  •   Other files     (see each Assignment's description for a list of other files to submit)


  • General step-by-step instructions appear below.
  • See especially: Export as HTML
  • After exporting the notebook as HTML, submit all files to the assignment submission repository provided by the course instructor.



If anything is unclear, please contact the course instructor.




Basic Jupyter notebook file operations¶



Create a new notebook¶

Back to Table of Contents

  • Install and launch Jupyter as described in the InstallJupyter tutorial.

  • Select New , then Python 3

screenshot



  • A new notebook will be created in a new browser tab.

screenshot




Rename an open notebook¶

Back to Table of Contents

  • By default, the Jupyter notebook is named Untitled.

  • To rename the notebook, click on the file name.

screenshot



  • Enter a new file name in the dialog box, then press Rename.

screenshot



  • Return to the Jupyter Home Page (in the first tab), and verify that the file name has been saved.

screenshot



  • The file is already saved on your computer. To find out where it is saved, return to the notebook, enter pwd (print working directory), and then select Run.

screenshot



  • The folder containing the notebook will be displayed. In this case, it is the Downloads folder.

screenshot



  • Open a file explorer window (e.g., Explorer [Windows], Finder [Mac]) and find the folder.

  • Note that there is a file called Assn01.ipynb.

screenshot


Save an open notebook¶

Back to Table of Contents

  • By default, Jupyter automatically saves notebook updates as you type.

  • However, it is also useful to manually save the notebook when you reach milestones. For example: question finished, cell finished, assignment finished, etc.

  • To manually save the notebook, select File .. Save and Checkpoint

ascreenshot




Close an open notebook¶

Back to Table of Contents

  • To close an open notebook, select File .. Close and Halt

ascreenshot



  • The tab will close, returning you to the Jupyter Home tab.

  • Verify that the notebook's icon is gray.

  • Also verify Last Modified time (i.e., the time when the notebook was last saved).

ascreenshot



  • Note that open notebooks' icons are green.

  • Also note that Running is displayed when the notebook is open.

ascreenshot




Open an existing Jupyter notebook¶

Back to Table of Contents

  • From Jupyter's Home screen, click on the .ipynb file you want to open.

screenshot




Modify an open Jupyter notebook¶



Add Python cells¶

Back to Table of Contents

  • Select Insert .. Insert Cell Below    (or Insert Cell Above)

ascreenshot



  • Click on the cell type list.

ascreenshot



  • Ensure that the cell type is Code

ascreenshot




Add Markdown cells¶

Back to Table of Contents

ascreenshot




Delete, duplicate or reorder cells¶

Back to Table of Contents

  • Delete cells:     From the Edit menu, choose Delete Cells

  • Duplicate cells:     From the Edit menu, choose Copy Cells then Paste Cells

  • Reorder cells:     From the Edit menu, choose Move Cell Up or Move Cell Down

screenshot




Export an open notebook as HTML¶

Back to Table of Contents

  • Select File .. Download as .. HTML

ascreenshot



  • The exported HTML file will appear in the same folder as the open notebook.

ascreenshot



  • Double-click on the HTML file to open it.

  • Verify that the contents look as expected.

ascreenshot




Quit Jupyter¶

Back to Table of Contents

  • Close all files as described above

  • From the Jupyter Home screen, select Quit

screenshot

  • Verify that the Server stopped message appears.



screenshot



  • You can now safely close the brower tab and/or quit the browser.